package proxy;

/**
 * Created by : Infaraway
 * DATE : 2017/3/3
 * Time : 15:14
 * Funtion :
 */
public class CalculatorImpl implements Calculator{
    @Override
    public int add(int a, int b) {
        //需要增加方法调用的日志信息
        //System.out.println("The method add begins with:" + a +","+ b);
        int result = a + b;
        //System.out.println("The method add ends with:" + result);
        System.out.println(result);
        return result;
    }

    @Override
    public int sub(int a, int b) {
        int result = a - b;
        System.out.println(result);
        return result;
    }

    @Override
    public void mul(int a, int b) {
        int result = a * b;
        System.out.println(result);
    }

    @Override
    public void div(int a, int b) {
        int result = a / b;
        System.out.println(result);
    }
}
